package com.meiqiongproperty.yiguanjia.http.api;

import android.content.Context;

import com.meiqiongproperty.yiguanjia.http.HttpManager;
import com.meiqiongproperty.yiguanjia.http.interfaces.IHttpCallback;
import com.meiqiongproperty.yiguanjia.http.interfaces.SimpleHttpCallback;
import com.meiqiongproperty.yiguanjia.httpbean.AdvertInfoBean;
import com.meiqiongproperty.yiguanjia.httpbean.HomeNoticeBean;
import com.meiqiongproperty.yiguanjia.httpbean.HouseBean;
import com.meiqiongproperty.yiguanjia.httpbean.TenementAddressBean;
import com.meiqiongproperty.yiguanjia.httpbean.TenementInformationInfo;
import com.meiqiongproperty.yiguanjia.httpbean.UserInfo;
import com.meiqiongproperty.yiguanjia.httpbean.healthy.HealthyInfoBean;
import com.meiqiongproperty.yiguanjia.httpbean.healthy.HealthyShopListBean;
import com.meiqiongproperty.yiguanjia.httpbean.healthy.PhysicianConsultBean;
import com.meiqiongproperty.yiguanjia.httpbean.healthy.PhysicianConsultDetailBean;
import com.meiqiongproperty.yiguanjia.httpbean.healthy.SubmitQuestionContentBean;
import com.meiqiongproperty.yiguanjia.httpbean.life.LifeDetailBean;
import com.meiqiongproperty.yiguanjia.httpbean.life.LifeServiceDetailBean;
import com.meiqiongproperty.yiguanjia.httpbean.life.LifeWXPay;
import com.meiqiongproperty.yiguanjia.httpbean.life.LifeZFBPay;
import com.meiqiongproperty.yiguanjia.httpbean.order.LifeServiceOrderBean;
import com.meiqiongproperty.yiguanjia.httpbean.order.LifeServiceOrderDetailBean;
import com.meiqiongproperty.yiguanjia.httpbean.order.OrderDetailListBean;
import com.meiqiongproperty.yiguanjia.httpbean.order.ShopOrderBean;
import com.meiqiongproperty.yiguanjia.httpbean.order.ShopOrderRepayWXBean;
import com.meiqiongproperty.yiguanjia.httpbean.order.ShopOrderRepayZFBBean;
import com.meiqiongproperty.yiguanjia.httpbean.order.TenementOrderBean;
import com.meiqiongproperty.yiguanjia.httpbean.order.TenementOrderDetailBean;
import com.meiqiongproperty.yiguanjia.httpbean.pension.MonthlyComboBean;
import com.meiqiongproperty.yiguanjia.httpbean.shopping.ShopDetailBean;
import com.meiqiongproperty.yiguanjia.httpbean.shopping.ShopListBean;
import com.meiqiongproperty.yiguanjia.httpbean.tenement.CarBean;
import com.meiqiongproperty.yiguanjia.httpbean.tenement.Notice;
import com.meiqiongproperty.yiguanjia.httpbean.tenement.pay.ChargeCarZFB;
import com.meiqiongproperty.yiguanjia.httpbean.tenement.pay.CommPayWX;
import com.meiqiongproperty.yiguanjia.httpbean.tenement.pay.CommPayZFB;
import com.meiqiongproperty.yiguanjia.httpbean.tenement.pay.WaterWX;
import com.meiqiongproperty.yiguanjia.httpbean.tenement.pay.WaterZFB;
import com.meiqiongproperty.yiguanjia.httpbean.user.ForGetpassword;
import com.meiqiongproperty.yiguanjia.httpbean.user.RegiserBean;
import com.meiqiongproperty.yiguanjia.httpbean.user.SmSCode;

import okhttp3.RequestBody;

/**
 * @author Chen
 * @version V1.0
 * @Describe apiServer
 * @package com.sameway.cnotes.http.api
 * @date 17/3/13 下午3:51
 */
public class ApiService {
    private static final YGJApi C_NOTES_API = HttpManager.getInstance().getApiService(YGJApi.class);


//
//    /**
//     * 请求验证码
//     *
//     * @param telephone telephone
//     * @param codeType  验证码类型（0：注册验证码；1：绑定手机号码验证码）
//     * @return
//     */
//    public static void getMsg(Context context, final IHttpCallback<BaseModel> iHttpCallback, String telephone, String codeType) {
//        ApiUtils.toSubscribe(context, C_NOTES_API.getMsg(telephone, codeType), iHttpCallback);
//    }
//
//    /**
//     * 注册
//     *
//     * @param iHttpCallback
//     * @param requestBody
//     */
//    public static void doReigster(Context context, final IHttpCallback<BaseModel> iHttpCallback, RequestBody requestBody) {
//        ApiUtils.toSubscribe(context, C_NOTES_API.doRegister(requestBody), iHttpCallback);
//    }
//

    /**
     * 登录
     *
     * @param context
     * @param iHttpCallback
     * @param requestBody
     */
    public static void doLogin(Context context, final IHttpCallback<UserInfo> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.doLogin(requestBody), iHttpCallback);
    }

    /**
     * 获取省份
     *
     * @param context
     * @param iHttpCallback
     */
    public static void getRegion(Context context, final IHttpCallback<TenementAddressBean> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.getRegion(requestBody), iHttpCallback);
    }

    /**
     * 获取小区
     *
     * @param context
     * @param iHttpCallback
     * @param requestBody
     */
    public static void getHouse(Context context, final IHttpCallback<HouseBean> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.getHouse(requestBody), iHttpCallback);
    }

    /**
     * 发送短信
     */
    public static void sendMsg(Context context, final IHttpCallback<SmSCode> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.sendSMS(requestBody), iHttpCallback);
    }

    //发送注册信息register
    public static void register(Context context, final IHttpCallback<RegiserBean> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.register(requestBody), iHttpCallback);
    }


    //找回密码
    public static void resetPassword(Context context, final IHttpCallback<ForGetpassword> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.resetPassword(requestBody), iHttpCallback);
    }

    //物业广告
    public static void getNotice(Context context, final IHttpCallback<Notice> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.getNotice(requestBody), iHttpCallback);
    }

    //首页广告
    public static void getHomeNotice(Context context, final IHttpCallback<HomeNoticeBean> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.getHomeNotice(requestBody), iHttpCallback);
    }

    //登录退出
    public static void logout(Context context, final IHttpCallback<ForGetpassword> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.logout(requestBody), iHttpCallback);
    }


    /**
     * 商品列表
     *
     * @param context
     * @param iHttpCallback
     * @param requestBody
     */
    public static void getShopList(Context context, final IHttpCallback<ShopListBean> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.shopList(requestBody), iHttpCallback);
    }

    /**
     * 商品详情
     *
     * @param context
     * @param iHttpCallback
     * @param requestBody
     */
    public static void getShopDetail(Context context, final IHttpCallback<ShopDetailBean> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.shopDetail(requestBody), iHttpCallback);
    }

    //物业支付 支付宝
    public static void chargeProperty(Context context, final IHttpCallback<CommPayZFB> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.chargeProperty(requestBody), iHttpCallback);
    }

    //物业支付 微信
    public static void chargePropertyWX(Context context, final IHttpCallback<CommPayWX> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.chargePropertyWAX(requestBody), iHttpCallback);
    }

    //生活缴费
    public static void chargeLife(Context context, final SimpleHttpCallback<WaterZFB> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.chargeLife(requestBody), iHttpCallback);
    }

    //生活缴费
    public static void chargeLifeWX(Context context, final SimpleHttpCallback<WaterWX> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.chargeLifeWX(requestBody), iHttpCallback);
    }


    //获取广告
    public static void getAdvertInfo(Context context, final IHttpCallback<AdvertInfoBean> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.getAdvertInfo(requestBody), iHttpCallback);
    }

    //车牌获取
    public static void getCar(Context context, final IHttpCallback<CarBean> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.getCar(requestBody), iHttpCallback);
    }

    //停车费缴费
    public static void chargeCar(Context context, final IHttpCallback<ChargeCarZFB> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.chargeCar(requestBody), iHttpCallback);
    }

    //社区资讯
    public static void getInfo(Context context, final IHttpCallback<TenementInformationInfo> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.getInfo(requestBody), iHttpCallback);
    }

    /**
     * 健康个人档案
     */
    public static void getHealthyInfo(Context context, final IHttpCallback<HealthyInfoBean> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.getHealthyInfo(requestBody), iHttpCallback);
    }

    /**
     * 咨询列表
     */
    public static void getPhysicianConsultList(Context context, final IHttpCallback<PhysicianConsultBean> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.getConsultListInfo(requestBody), iHttpCallback);
    }

    /**
     * 咨询详情
     */
    public static void getPhysicianConsultDetail(Context context, final IHttpCallback<PhysicianConsultDetailBean> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.getConsultDetailInfo(requestBody), iHttpCallback);
    }

    /**
     * 提交提问内容数据
     */
    public static void sumbitQuestionContent(Context context, final IHttpCallback<SubmitQuestionContentBean> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.submitQuestionContent(requestBody), iHttpCallback);
    }

    /**
     * 提交订单数据支付宝
     */
    public static void submitOrderDataZFB(Context context, final IHttpCallback<CommPayZFB> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.submitOrderDataZFB(requestBody), iHttpCallback);
    }

    /**
     * 提交订单数据微信
     */
    public static void submitOrderDataWX(Context context, final IHttpCallback<CommPayWX> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.submitOrderDataWX(requestBody), iHttpCallback);
    }

    /**
     * 获取商城订单列表
     */
    public static void getShopOrderList(Context context, final IHttpCallback<ShopOrderBean> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.getShopOrder(requestBody), iHttpCallback);
    }

    /**
     * 获取商城订单列表
     */
    public static void getLifeServiceOrderList(Context context, final IHttpCallback<LifeServiceOrderBean> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.getLifeServiceOrder(requestBody), iHttpCallback);
    }

    /**
     * 获取商城订单列表
     */
    public static void getTenementOrderList(Context context, final IHttpCallback<TenementOrderBean> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.getTenementOrder(requestBody), iHttpCallback);
    }

    /**
     * 获取怡生活二级列表
     */
    public static void getLifeDetailList(Context context, final IHttpCallback<LifeDetailBean> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.getLifeDetailList(requestBody), iHttpCallback);
    }

    /**
     * 获取生活服务详情
     */
    public static void getLifeServiceDetail(Context context, final IHttpCallback<LifeServiceDetailBean> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.getLifeServiceDetail(requestBody), iHttpCallback);
    }

    /**
     * 服务下单 支付宝
     */
    public static void LifeServicePayZFB(Context context, final IHttpCallback<LifeZFBPay> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.getLifeServiceZFBPay(requestBody), iHttpCallback);
    }

    /**
     * 服务下单 微信
     */
    public static void LifeServicePayWX(Context context, final IHttpCallback<LifeWXPay> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.getLifeServiceWXPay(requestBody), iHttpCallback);
    }

    /**
     * 获取订单详情列表数据
     */
    public static void OrderDetailList(Context context, final IHttpCallback<OrderDetailListBean> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.getOrderDetailList(requestBody), iHttpCallback);
    }

    /**
     * 获取生活服务订单详情数据
     */
    public static void getLifeServiceOrderDetail(Context context, final IHttpCallback<LifeServiceOrderDetailBean> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.lifeServiceOrderDetail(requestBody), iHttpCallback);
    }

    /**
     * 获取生活服务订单详情数据
     */
    public static void getTenementOrderDetail(Context context, final IHttpCallback<TenementOrderDetailBean> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.tenementOrderDetail(requestBody), iHttpCallback);
    }


    /**
     * 商品订单重新支付（微信）
     */
    public static void OrderShopWXPay(Context context, final IHttpCallback<ShopOrderRepayWXBean> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.repayShopWXOrder(requestBody), iHttpCallback);
    }

    /**
     * 商品订单重新支付（微信）
     */
    public static void OrderShopZFBPay(Context context, final IHttpCallback<ShopOrderRepayZFBBean> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.repayShopZFBOrder(requestBody), iHttpCallback);
    }

    /**
     * 修改帐号密码
     */
    public static void ModifyPassword(Context context, final IHttpCallback<ForGetpassword> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.modifyPwd(requestBody), iHttpCallback);
    }

    /**
     * 怡养老包月套餐
     */
    public static void getPensionMonthList(Context context, final IHttpCallback<MonthlyComboBean> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.pensionMonth(requestBody), iHttpCallback);
    }

    /**
     * 怡健康保健商城
     */
    public static void getHealthyShopList(Context context, final IHttpCallback<HealthyShopListBean> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.HealthyShopList(requestBody), iHttpCallback);
    }

    /**
     * 报修投诉
     */
    public static void feedback(Context context, final IHttpCallback<ForGetpassword> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.feedback(requestBody), iHttpCallback);
    }

    public static void upPortrait(Context context, final IHttpCallback<ForGetpassword> iHttpCallback, RequestBody requestBody) {
        ApiUtils.toSubscribe(context, C_NOTES_API.upPortrait(requestBody), iHttpCallback);
    }
}
